<?php

namespace App\Models;

class Article extends Base
{
    // 追加一个字段
    protected $appends = ['action'];

    public function getActionAttribute()
    {
        return $this->editBtn('admin.article.edit') . ' ' . $this->delBtn('admin.article.destroy');
    }

    public function getPicAttribute($value)
    {
        return config('url.domain') . $value;
    }
}
